
export function isFunction(data){
    return typeof data === 'function'
}
export function isObject(data){
    return data !== null && typeof data === 'object'
}
export function hasOwn (target, val){
    return target.hasOwnProperty(val)
}
export  function isArray(data){
    return Array.isArray(data)
}
function makeMap(str) {
    const map = {};
    const list = str.split(',');
    for (let i = 0; i < list.length; i++) {
        map[list[i]] = true;
    }
    return (key)=>map[key];
}
export const isReservedTag = makeMap(
    'template,script,style,element,content,slot,link,meta,svg,view,' +
    'a,div,img,image,text,span,input,switch,textarea,spinner,select,li,ul,button,' +
    'slider,slider-neighbor,indicator,canvas,' +
    'list,cell,header,loading,loading-indicator,refresh,scrollable,scroller,' +
    'video,web,embed,tabbar,tabheader,datepicker,timepicker,marquee,countdown',
    true
)


